﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace GesWork.maestros
{
    public partial class empleado : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Request.QueryString["id"];

            if (id == null)
            {
                FormView1.ChangeMode(FormViewMode.Insert);

            }

            fvAdress.DataBind();
            if (fvAdress.DataItemCount == 0)
            {
                btnNewAddres.Visible = true;
            }
            else
            {
                btnNewAddres.Visible = false;
            }

        }

        protected void nuevaDireccion(object sender, ImageClickEventArgs e)
        {
            fvAdress.ChangeMode(FormViewMode.Insert);
        }
    }
}
